#ifndef		_ORDERED_MAP_H_
#define		_ORDERED_MAP_H_

#include	"common.h"
#include	"monitor.h"

typedef void * type_common;

typedef u8int (*lt_pred)(type_common, type_common);

struct ordered_map{
	type_common *array;
	u32int size, maxsize;
	lt_pred less_than;
};

struct ordered_map create_ordered_map(u32int maxsize, lt_pred less_than);
struct ordered_map place_ordered_map(u32int addr, u32int maxsize, lt_pred less_than);
void destroy_ordered_map(struct ordered_map *map);

void insert_ordered_map(struct ordered_map *map, type_common ele);
void delete_ordered_map(struct ordered_map *map, u32int ind);
type_common lookfor_ordered_map(struct ordered_map *map, type_common ele);

#endif		/* _ORDERED_MAP_H_ */
